package com.yunkeji.api.auth.processor.service;

import com.yunkeji.api.auth.bo.ToLoginBo;

import java.util.HashMap;

/**
 * redis 监听工厂类
 *
 * @author 老张
 */
public class LoginFactory {

    private static HashMap<ToLoginBo.LoginType, LoginStrategy> objMap = new HashMap<>();

    private LoginFactory() {}

    public static void put(ToLoginBo.LoginType key, LoginStrategy loginStrategy) {
        objMap.put(key, loginStrategy);
    }

    public static LoginStrategy get(ToLoginBo.LoginType key) {
        LoginStrategy loginStrategy = objMap.get(key);
        return loginStrategy;
    }
}
